package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.UserGroupDao;
import com.sc.highspeed.db.model.UserGroupModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/11/27.
 */
@Service
public class UserGroupService {

    @Autowired
    private UserGroupDao userGroupDao;

    public UserGroupModel getUserGroupByName(String name) {
        return userGroupDao.getUserGroupByName(name);
    }

    public UserGroupModel getUserGroupById(int id) {
        return userGroupDao.getUserGroupById(id);
    }

    public List<UserGroupModel> getUserGroupList() {
        return userGroupDao.getUserGroupList();
    }

    public int insertUserGroup(UserGroupModel userGroupModel) {
        return userGroupDao.insertUserGroup(userGroupModel);
    }


    public int deleteUserGroupByName(int id) {
        return userGroupDao.deleteUserGroupByName(id);
    }

    public List<UserGroupModel> getUserGroupListByOrg(String organization) {
        return userGroupDao.getUserGroupListByOrg(organization);
    }

    public int updateOrg(int id, String organization) {
        return userGroupDao.updateOrg(id, organization);
    }

}
